package numbers;

import java.math.BigDecimal;

public class BigDecimalDemo {
    public static void main(String[] args) {
        Double d1 = new Double("0.01");
        Double d2 = new Double("0.02");
        System.out.println(d2 - d1);

        BigDecimal b1 = new BigDecimal("0.01");
        BigDecimal b2 = new BigDecimal("0.02");
        System.out.println(b2.subtract(b1));
    }
}
